import requests
import execjs
import time

time_now = int(time.time() * 1000)
js_compile = execjs.compile(open('jsk.js').read())
json_data = {
    'eid': '',
    'achievementQueryType': 'and',
    'achievementQueryDto': [],
    'personnelQueryDto': {
        'queryType': 'and',
    },
    'aptitudeQueryDto': {
        'queryType': 'and',
        'nameStr': '',
        'aptitudeQueryType': 'and',
        'businessScopeQueryType': 'or',
        'filePlaceType': '1',
        'aptitudeDtoList': [
            {
                'codeStr': '',
                'queryType': 'and',
                'aptitudeType': 'qualification',
            },
        ],
        'aptitudeSource': 'new',
    },
    'page': {
        'page': 4,
        'limit': 20,
        'field': '',
        'order': '',
    },
}
headers = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36',
    'sign': js_compile.call('get_sign', time_now, json_data),
    'timestamp': f'{time_now}',
}
response = requests.post('https://capi.jiansheku.com/nationzj/enterprice/page', headers=headers, json=json_data)
print(response.text)
